<?php

use Illuminate\Database\Seeder;

class AdminsTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     *  创建填充文件：php artisan make:seeder AdminsTableSeeder
     *  执行：php artisan db:seed
     */
    public function run()
    {
        $data = [
            'username'=>'admin',
            'password'=>bcrypt('123456'),
            'addtime'=>time(),
            'is_open'=>1
        ];
        DB::table('admins')->insert($data);
        $data = [
            'username'=>'beauty',
            'password'=>bcrypt('123456'),
            'addtime'=>time(),
            'is_open'=>0
        ];
        DB::table('admins')->insert($data);
    }
}
